﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;



    class ExtractEmail
    {
        static void Main(string[] args)
        {
            string text = @"Please contact us by phone (+359 222 222 222) or by email at example@abv.bg
                          or at baj.ivan@yahoo.co.uk. This is not email: test@test.
                          This also: @telerik.com. Neither this: a@a.b.";
           string[]  textArray= text.Split(' ');
           for (int i = 0; i < textArray.Length; i++)
           {
               if (Regex.IsMatch(textArray[i], @"[\w.]{2,20}@[\w.]{2,20}[.]{1}[\w.]{2,6}"))
               {
                   Console.WriteLine(textArray[i].Trim());
               }
           }
        }
    }

